package experimentReport.servlet;

import jakarta.servlet.*;
import jakarta.servlet.http.*;

import java.io.IOException;

public class Seven extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String numbers=req.getParameter("numbers");
        if(numbers==null|| numbers.isEmpty()){
            resp.sendRedirect("jsp/experimentReport/seven.jsp");
            return;
        }String submit=req.getParameter("submit");
        req.setAttribute("numbers",numbers);
        if(submit.contains("one"))
            req.getRequestDispatcher("sevenOne").forward(req,resp);
        else if(submit.contains("two"))
            req.getRequestDispatcher("sevenTwo").forward(req,resp);
    }
}
